#include "001.h"
//extern const char* grade[6];
void home(user*T1)
{
	if(T1->user_reight<0)return;
	char a[100]="\0";
	int b=0;
	while(1)
	{
		HEAD(T1);
		printf("\t\t****菜单：\n");
		printf("\t\t*******1：列出所有学生信息");
		if(T1->user_reight>3||T1->user_reight==0)printf("<<权限不足\n");else putchar('\n');
		printf("\t\t*******2：添加学生信息");
		if(T1->user_reight>2||T1->user_reight==0)printf("<<权限不足\n");else putchar('\n');
		printf("\t\t*******3：删除学生信息");
		if(T1->user_reight>2||T1->user_reight==0)printf("<<权限不足\n");else putchar('\n');
		printf("\t\t*******4：更改学生信息");
		if(T1->user_reight>2||T1->user_reight==0)printf("<<权限不足\n");else putchar('\n');
		printf("\t\t*******5：查找学生信息");
		if(T1->user_reight>3||T1->user_reight==0)printf("<<权限不足\n");else putchar('\n');
		printf("\t\t*******6：排序学生信息");
		if(T1->user_reight>3||T1->user_reight==0)printf("<<权限不足\n");else putchar('\n');
		printf("\t\t*******7：退出登陆\n");
		if(b==1)printf("\t\t***%c为错误信息!\n",a[0]);else printf("\n");
		if(b==2)printf("\t\t***权限不足，无法操作！\n");
		b=0;
		printf("\t\t***请选择：");
		scanf("%s",a);
		getchar();
		switch(a[0]-48)
		{
		case 1:
			if(T1->user_reight>3||T1->user_reight==0) b=2;else
			home_1(T1);
			break;
		case 2:
			if(T1->user_reight>2||T1->user_reight==0) b=2;else
			home_2(T1);
			break;
		case 3:
			if(T1->user_reight>2||T1->user_reight==0) b=2;else
			home_3(T1);
			break;
		case 4:
			if(T1->user_reight>2||T1->user_reight==0) b=2;else
			home_4(T1);
			break;
		case 5:
			if(T1->user_reight>3||T1->user_reight==0) b=2;else
			home_5(T1);
			break;
		case 6:
			if(T1->user_reight>3||T1->user_reight==0) b=2;else
			home_6(T1);
			break;
		case 7:
			return;
		default:
			b=1;
		}
	}
}
void home_1(user*T1)
{
	return;
}
void home_2(user*T1)
{
	return;
}
void home_3(user*T1)
{
	return;
}
void home_4(user*T1)
{
	return;
}
void home_5(user*T1)
{
	return;
}
void home_6(user*T1)
{
	return;
}
